<!DOCTYPE html>
<html>
    <head>
        <title>用户认证</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="__JS__/jquery.js"></script>
        
    </head>
    <body>
        <h1>用户认证</h1>
        <form method="post" action="__URL__/certificate">
            QQ：<input type="text" name="qq" />
            移动电话：<input type="text" name="mobile" id="mobile"/>
            <input type="button" value="发送短信验证码" id="certificate" />
            <span id="tip"></span><br>
            <hr>
            验证码：<input type="text" name='verify' />
            擅长领域：<input type="text" name="advantage" />
            <input type="submit" name="submit" value="提交" />
        </form>
    <script type="text/javascript">
        $("#certificate").click(function(){
            $("#mobile").attr("name");
            var mobile = $("#mobile").val();
            $.post("/index.php?s=/User/User/verifyMessage", 
                {mobile:mobile},
                function(data){
                    if(data.code == 0){
                        $("#tip").text("短信发送成功！");
                    }else{
                        $("#tip").text(data.msg);
                    }
            })
        });
    </script>
    </body>    
</html>
